home *** CD-ROM | disk | FTP | other *** search
/ AGA Toolkit '97 / The AGA Toolkit '97.iso / applications / kingfisher2 / rexxdemo.kfrx < prev    next >
Text File  |  1996-09-07  |  3KB  |  90 lines

  1. /* ARexx example for RexxFisher:
  2.  *
  3.  * Run this program while KFServer AND RexxFisher are running.
  4.  * I'M MAKING NO EFFORT TO ASSURE THAT THESE TWO ARE AVAILABLE.
  5.  *
  6.  * Written by:  Udo Schuermann
  7.  * $VER: RexxDemo 1.2 (1.3.95)
  8.  */
  9. options results
  10. address rexxfisher1
  11.  
  12. RF_VERSION
  13. say "Hi, you are now connected to ..." result
  14.  
  15. RF_HELP
  16. say ""
  17. say "Here is some HELP for you, information on RexxFisher in other words:"
  18. say ""
  19. say result
  20.  
  21. say "---------------------------------------------------------------------------"
  22.  
  23. /* Let's give ourselves a nice name */
  24. RF_HELLO "RexxDemo.kfrx (RexxFisher Demo Script)"
  25.  
  26. say "Here is Fish #3693 in raw form:"
  27. RF_GETFISH 3693      /* notice: no 2nd parameter, it's totally unformatted and raw! */
  28. say result
  29.  
  30. say "---------------------------------------------------------------------------"
  31.  
  32. say "Here is the same fish again, but this time nicely formatted to fit 75 columns:"
  33. RF_GETFISH 0 75      /* fish 0 means CURRENT fish, the most recently accessed record */
  34. say result
  35.  
  36. say "---------------------------------------------------------------------------"
  37.  
  38. say "And now, how about 60 columns?"
  39. RF_GETFISH 0 60
  40. say result
  41.  
  42. say "------------------------------------------------------------"
  43.  
  44. say "And 40 columns ..."
  45. RF_GETFISH 0 40
  46. say result
  47.  
  48. say "----------------------------------------"
  49.  
  50. say "You're tremendously impressed, aren't you?  :)"
  51. say ""
  52.  
  53. say "Here is some status information directly from the KFServer to you:"
  54. say ""
  55. RF_STATUS
  56. say result
  57.  
  58. say "---------------------------------------------------------------------------"
  59.  
  60. say "Here is a demonstration of a custom display format (read KingFisher.DOC for"
  61. say "information because both KingFisher and RexxFisher use the exact same codes"
  62. say "for the display formats!)"
  63.  
  64. /* Notice that ARexx doesn't change the \n symbols in any way, they're just
  65.  * passed to the conversion routines so that a '\' symbol followed by a 'n'
  66.  * character causes a line break.  See the "Output Formatting" section in
  67.  * the KingFisher2.guide for lots of information on these!
  68.  */
  69. RF_GETFISH 0 75 "NAME=@{name}\nAUTHOR=@{author}\nDESCRIPTION=@{description}"
  70. say result
  71.  
  72. say "---------------------------------------------------------------------------"
  73.  
  74. /* Here is an example of how to retrieve ONLY a specific field */
  75. RF_GETFISH 0 999 "@{name}"
  76. if result = "KingFisher" then
  77.    say "Hey, look!  It just so happens that this record is the KingFisher program!"
  78. else
  79.    say "The program we examine above is not the KingFisher program, but rather "||result
  80.  
  81. say "---------------------------------------------------------------------------"
  82.  
  83. say "Now read the RexxFisher section in KingFisher2.guide for some better"
  84. say "descriptions of what RexxFisher is capable of!"
  85. say ""
  86. say "And now we logout of the server again ..."
  87. RF_BYE
  88.  
  89. say "Done.  Bye-bye!"
  90.